//
//  AbountOurCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/29.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "AbountOurCell.h"

@implementation AbountOurCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubView];
        [self initOption];
    }
    return self;
}
- (void)initSubView{
}
- (void)addLine{
    self.layer.borderColor = [UIColorChange colorwithHexString:@"#DDDDDD"].CGColor;
    self.layer.borderWidth = 1;
    self.layer.cornerRadius = 5;
}
- (void)initOption{
    [self addSubview:self.leftLabel];
    [self addSubview:self.rightLabel];
    [_leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@20);
        make.centerY.equalTo(self.mas_centerY);
        make.right.equalTo(self.mas_centerX);
        make.height.equalTo(@20);
    }];
    [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        make.right.equalTo(@0).offset(-20);
        make.height.equalTo(@20);
    }];
}
- (UILabel *)leftLabel{
    if (!_leftLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.font = [UIFont systemFontOfSize:14];
        label.textAlignment = 0;
        label.textColor = [UIColor darkGrayColor];
        label.text = @" ";
        _leftLabel = label;
    }
    return _leftLabel;
}
- (UILabel *)rightLabel{
    if (!_rightLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.font = [UIFont systemFontOfSize:14];
        label.textAlignment = 2;
        label.textColor = TITLECOLOR;
        label.text = @" ";
        _rightLabel = label;
    }
    return _rightLabel;
}
@end
